3.1.59 \(\int \frac {\csc ^2(c+d x)}{(a-a \sin ^2(c+d x))^2} \, dx\) [59]

Optimal. Leaf size=47 \[ -\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tan (c+d x)}{a^2 d}+\frac {\tan ^3(c+d x)}{3 a^2 d} \]

[Out]

-cot(d*x+c)/a^2/d+2*tan(d*x+c)/a^2/d+1/3*tan(d*x+c)^3/a^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3254, 2700, 276} \begin {gather*} \frac {\tan ^3(c+d x)}{3 a^2 d}+\frac {2 \tan (c+d x)}{a^2 d}-\frac {\cot (c+d x)}{a^2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

-(Cot[c + d*x]/(a^2*d)) + (2*Tan[c + d*x])/(a^2*d) + Tan[c + d*x]^3/(3*a^2*d)

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\csc ^2(c+d x)}{\left (a-a \sin ^2(c+d x)\right )^2} \, dx &=\frac {\int \csc ^2(c+d x) \sec ^4(c+d x) \, dx}{a^2}\\ &=\frac {\text {Subst}\left (\int \frac {\left (1+x^2\right )^2}{x^2} \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (2+\frac {1}{x^2}+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a^2 d}\\ &=-\frac {\cot (c+d x)}{a^2 d}+\frac {2 \tan (c+d x)}{a^2 d}+\frac {\tan ^3(c+d x)}{3 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 50, normalized size = 1.06 \begin {gather*} \frac {-\frac {\cot (c+d x)}{d}+\frac {5 \tan (c+d x)}{3 d}+\frac {\sec ^2(c+d x) \tan (c+d x)}{3 d}}{a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2/(a - a*Sin[c + d*x]^2)^2,x]

[Out]

(-(Cot[c + d*x]/d) + (5*Tan[c + d*x])/(3*d) + (Sec[c + d*x]^2*Tan[c + d*x])/(3*d))/a^2

________________________________________________________________________________________

Maple [A]
time = 0.26, size = 37, normalized size = 0.79

method result size
derivativedivides \(\frac {\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}+2 \tan \left (d x +c \right )-\frac {1}{\tan \left (d x +c \right )}}{d \,a^{2}}\) \(37\)
default \(\frac {\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}+2 \tan \left (d x +c \right )-\frac {1}{\tan \left (d x +c \right )}}{d \,a^{2}}\) \(37\)
risch \(-\frac {16 i \left (2 \,{\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{3 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}\) \(49\)
norman \(\frac {\frac {1}{2 a d}-\frac {6 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {25 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {6 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) \(116\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2/(a-a*sin(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(1/3*tan(d*x+c)^3+2*tan(d*x+c)-1/tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 40, normalized size = 0.85 \begin {gather*} \frac {\frac {\tan \left (d x + c\right )^{3} + 6 \, \tan \left (d x + c\right )}{a^{2}} - \frac {3}{a^{2} \tan \left (d x + c\right )}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/3*((tan(d*x + c)^3 + 6*tan(d*x + c))/a^2 - 3/(a^2*tan(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 46, normalized size = 0.98 \begin {gather*} -\frac {8 \, \cos \left (d x + c\right )^{4} - 4 \, \cos \left (d x + c\right )^{2} - 1}{3 \, a^{2} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

-1/3*(8*cos(d*x + c)^4 - 4*cos(d*x + c)^2 - 1)/(a^2*d*cos(d*x + c)^3*sin(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc ^{2}{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} - 2 \sin ^{2}{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2/(a-a*sin(d*x+c)**2)**2,x)

[Out]

Integral(csc(c + d*x)**2/(sin(c + d*x)**4 - 2*sin(c + d*x)**2 + 1), x)/a**2

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 48, normalized size = 1.02 \begin {gather*} -\frac {\frac {3}{a^{2} \tan \left (d x + c\right )} - \frac {a^{4} \tan \left (d x + c\right )^{3} + 6 \, a^{4} \tan \left (d x + c\right )}{a^{6}}}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a-a*sin(d*x+c)^2)^2,x, algorithm="giac")

[Out]

-1/3*(3/(a^2*tan(d*x + c)) - (a^4*tan(d*x + c)^3 + 6*a^4*tan(d*x + c))/a^6)/d

________________________________________________________________________________________

Mupad [B]
time = 13.58, size = 36, normalized size = 0.77 \begin {gather*} \frac {{\mathrm {tan}\left (c+d\,x\right )}^4+6\,{\mathrm {tan}\left (c+d\,x\right )}^2-3}{3\,a^2\,d\,\mathrm {tan}\left (c+d\,x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)^2*(a - a*sin(c + d*x)^2)^2),x)

[Out]

(6*tan(c + d*x)^2 + tan(c + d*x)^4 - 3)/(3*a^2*d*tan(c + d*x))

________________________________________________________________________________________